/**
 * Created by hlh on 2015/8/27.
 */
import Pr from '../progress/progress';
export default class P5 {
    constructor(mom) {
        this.className = 'p5';
        this.mom = mom;
    }

    render() {
        return `
        <div class="css_p5_helper"></div>
        <div class="text_p5_img"></div>
        <div class="content_p5_img"></div>
        <div class="buttons_p5_container">
          <div class="column"><div class="camera_p5_img"></div></div>
            <div class="column"><div class="progress_p5_img"></div></div>
        </div>
        `;
    }

    listen() {
        let that=this;
        return [{
            momId: '.p5',
            uid: '.progress_p5_img',
            ontouchstart(){
                let cn='.progress_mom_placeholder';
                Pr.renderOut(cn);
                setTimeout(function () {
                    document.querySelector(cn).classList.add('show');
                    that.mom.pauseAudio();
                }, 0);
            }
        }, {
            momId: '.p5',
            uid: '.camera_p5_img',
            ontouchstart(){
                document.querySelector('#photo').click();
            }
        }, {
            momId: '.mom',
            uid: '.progress_mom_placeholder',
            ontouchstart(binded, evt){
                evt.stopPropagation();
            }
        }
        ]
    }
}
